package org.sunflower.web;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping("/hello")
@RestController
@Slf4j
public class HelloController {

    @GetMapping
    public String hello() {
        log.info("来了请求。。。。。");
        return "hello...";
    }

    @GetMapping("/domain")
    public Map<String,Object> domain() {
        HashMap<String, Object> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("username", "谭景玉");
        return objectObjectHashMap;
    }
}
